<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@page contentType="text/html;charset=utf-8"%>
<f:view locale="#{user.locale}">
	<f:loadBundle basename="messages" var="msgs" />
	<html>
		<head>
			<title><h:outputText value="#{msgs.titleText}" />
			</title>
		</head>
		<body>
			<h:messages layout="table" style="color:red"/>
			<h:form>
				<h3>
					<h:outputText value="#{msgs.hintText}" />
				</h3>
				<h:outputText value="#{user.errMessage}" />
				<p>
					<h:outputText value="#{msgs.nameText}" />
					:
					<h:inputText value="#{user.name}" required="true"><f:validateLongRange minimum="3" maximum="1000"/></h:inputText>
				<p>
					<h:outputText value="#{msgs.passText}" />
					:
					<h:inputSecret value="#{user.password}" required="true" validator="#{user.validate}"></h:inputSecret>
				<p>
					<h:commandButton value="#{msgs.commandText}"
						actionListener="#{user.verify}" action="#{user.verify}" />
					<h:selectOneRadio value="#{user.locale}">
						<f:selectItem itemValue="zh_TW" itemLabel="#{msgs.zh_TWText}" />
						<f:selectItem itemValue="en" itemLabel="#{msgs.enText}" />
					</h:selectOneRadio>
			</h:form>

			設定的日期是：
			<b> <h:outputText value="#{dateUser.date}">
					<f:convertDateTime pattern="yyyy/MM/dd" />
				</h:outputText> </b>

			<h:form>
				<h:inputText id="dateField" value="#{dateUser.date}">
					<f:convertDateTime pattern="dd/MM/yyyy" />
				</h:inputText>
				<h:message for="dateField" style="color:blue" />
				<br>
				<h:commandButton value="送出" action="show" />
			</h:form>


			Guest名稱是：
			<b> <h:outputText value="#{guest.converterBean}" converter="#{guest.converter}">
				</h:outputText> </b>
			<h:form>
				<h:inputText id="userField" value="#{guest.converterBean}"
					converter="#{guest.converter}" />
				<h:message for="userField" style="color:red" />
				<br>
				<h:commandButton value="送出" action="show" />
			</h:form>

<h:inputText id="user" value="#{user.name}"/>
 <h:outputLabel for="user" value="#{user.name}"/> 
		</body>
	</html>
</f:view>